home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / tabbed21 / main.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-02  |  14.0 KB  |  391 lines

  1. VERSION 2.00
  2. Begin Form Main 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Tabbed Dialog VBX Demo"
  5.    ClientHeight    =   4845
  6.    ClientLeft      =   1725
  7.    ClientTop       =   2955
  8.    ClientWidth     =   8700
  9.    Height          =   5250
  10.    Left            =   1665
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4845
  13.    ScaleWidth      =   8700
  14.    Top             =   2610
  15.    Width           =   8820
  16.    Begin PictureBox IFrame1 
  17.       BackColor       =   &H00C0C0C0&
  18.       Height          =   3705
  19.       Index           =   2
  20.       Left            =   135
  21.       ScaleHeight     =   3675
  22.       ScaleWidth      =   8145
  23.       TabIndex        =   21
  24.       Top             =   930
  25.       Visible         =   0   'False
  26.       Width           =   8175
  27.       Begin Label Label19 
  28.          BackStyle       =   0  'Transparent
  29.          Caption         =   "A TabPosition Property to allow the tabs to be places along any edge of the control."
  30.          FontBold        =   0   'False
  31.          FontItalic      =   0   'False
  32.          FontName        =   "Arial"
  33.          FontSize        =   9.75
  34.          FontStrikethru  =   0   'False
  35.          FontUnderline   =   0   'False
  36.          Height          =   510
  37.          Left            =   780
  38.          TabIndex        =   19
  39.          Top             =   2130
  40.          Width           =   6015
  41.       End
  42.       Begin Label Label18 
  43.          BackStyle       =   0  'Transparent
  44.          Caption         =   "A Rows Property to enable multiple rows of tabs for a single control."
  45.          FontBold        =   0   'False
  46.          FontItalic      =   0   'False
  47.          FontName        =   "Arial"
  48.          FontSize        =   9.75
  49.          FontStrikethru  =   0   'False
  50.          FontUnderline   =   0   'False
  51.          Height          =   360
  52.          Left            =   780
  53.          TabIndex        =   20
  54.          Top             =   1635
  55.          Width           =   6150
  56.       End
  57.       Begin Label Label17 
  58.          BackStyle       =   0  'Transparent
  59.          Caption         =   "A TabHeight Property to allow the size of the tabs to be changed."
  60.          FontBold        =   0   'False
  61.          FontItalic      =   0   'False
  62.          FontName        =   "Arial"
  63.          FontSize        =   9.75
  64.          FontStrikethru  =   0   'False
  65.          FontUnderline   =   0   'False
  66.          Height          =   405
  67.          Left            =   780
  68.          TabIndex        =   18
  69.          Top             =   1110
  70.          Width           =   6075
  71.       End
  72.       Begin Label Label16 
  73.          BackStyle       =   0  'Transparent
  74.          Caption         =   "New Features in version 2.0:"
  75.          FontBold        =   0   'False
  76.          FontItalic      =   0   'False
  77.          FontName        =   "Arial"
  78.          FontSize        =   12
  79.          FontStrikethru  =   0   'False
  80.          FontUnderline   =   0   'False
  81.          Height          =   375
  82.          Left            =   150
  83.          TabIndex        =   17
  84.          Top             =   555
  85.          Width           =   8040
  86.       End
  87.       Begin Label Label15 
  88.          Alignment       =   2  'Center
  89.          BackColor       =   &H00C0C0C0&
  90.          Caption         =   "Tabbed Dialog VBX"
  91.          FontBold        =   -1  'True
  92.          FontItalic      =   0   'False
  93.          FontName        =   "MS Sans Serif"
  94.          FontSize        =   13.5
  95.          FontStrikethru  =   0   'False
  96.          FontUnderline   =   0   'False
  97.          Height          =   450
  98.          Left            =   0
  99.          TabIndex        =   16
  100.          Top             =   90
  101.          Width           =   8175
  102.       End
  103.    End
  104.    Begin PictureBox IFrame1 
  105.       BackColor       =   &H00C0C0C0&
  106.       Height          =   3675
  107.       Index           =   3
  108.       Left            =   90
  109.       ScaleHeight     =   3645
  110.       ScaleWidth      =   8280
  111.       TabIndex        =   22
  112.       Top             =   960
  113.       Visible         =   0   'False
  114.       Width           =   8310
  115.       Begin Label Label6 
  116.          BackColor       =   &H00C0C0C0&
  117.          Caption         =   "Ashton Information Services is:"
  118.          FontBold        =   -1  'True
  119.          FontItalic      =   0   'False
  120.          FontName        =   "MS Sans Serif"
  121.          FontSize        =   9.75
  122.          FontStrikethru  =   0   'False
  123.          FontUnderline   =   0   'False
  124.          Height          =   2505
  125.          Left            =   90
  126.          TabIndex        =   5
  127.          Top             =   1110
  128.          Width           =   8085
  129.       End
  130.       Begin Label Label5 
  131.          Alignment       =   2  'Center
  132.          BackColor       =   &H00C0C0C0&
  133.          Caption         =   "Copyright 
  134.  1993, Ashton Information Services"
  135.          FontBold        =   -1  'True
  136.          FontItalic      =   0   'False
  137.          FontName        =   "MS Sans Serif"
  138.          FontSize        =   9.75
  139.          FontStrikethru  =   0   'False
  140.          FontUnderline   =   0   'False
  141.          Height          =   285
  142.          Left            =   90
  143.          TabIndex        =   4
  144.          Top             =   765
  145.          Width           =   8175
  146.       End
  147.       Begin Label Label4 
  148.          Alignment       =   2  'Center
  149.          BackColor       =   &H00C0C0C0&
  150.          Caption         =   "Version 2.0"
  151.          FontBold        =   -1  'True
  152.          FontItalic      =   0   'False
  153.          FontName        =   "MS Sans Serif"
  154.          FontSize        =   9.75
  155.          FontStrikethru  =   0   'False
  156.          FontUnderline   =   0   'False
  157.          Height          =   315
  158.          Left            =   45
  159.          TabIndex        =   3
  160.          Top             =   495
  161.          Width           =   8220
  162.       End
  163.       Begin Label Label3 
  164.          Alignment       =   2  'Center
  165.          BackColor       =   &H00C0C0C0&
  166.          Caption         =   "Tabbed Dialog VBX"
  167.          FontBold        =   -1  'True
  168.          FontItalic      =   0   'False
  169.          FontName        =   "MS Sans Serif"
  170.          FontSize        =   13.5
  171.          FontStrikethru  =   0   'False
  172.          FontUnderline   =   0   'False
  173.          Height          =   450
  174.          Left            =   30
  175.          TabIndex        =   2
  176.          Top             =   45
  177.          Width           =   8175
  178.       End
  179.    End
  180.    Begin PictureBox IFrame1 
  181.       BackColor       =   &H00C0C0C0&
  182.       Height          =   3675
  183.       Index           =   1
  184.       Left            =   105
  185.       ScaleHeight     =   3645
  186.       ScaleWidth      =   8280
  187.       TabIndex        =   23
  188.       Top             =   975
  189.       Visible         =   0   'False
  190.       Width           =   8310
  191.       Begin ComboBox Combo2 
  192.          Height          =   300
  193.          Left            =   2310
  194.          Sorted          =   -1  'True
  195.          Style           =   2  'Dropdown List
  196.          TabIndex        =   11
  197.          Top             =   1950
  198.          Width           =   3000
  199.       End
  200.       Begin ComboBox Combo1 
  201.          Height          =   300
  202.          Left            =   2310
  203.          Sorted          =   -1  'True
  204.          Style           =   2  'Dropdown List
  205.          TabIndex        =   7
  206.          Top             =   570
  207.          Width           =   3000
  208.       End
  209.       Begin Label Label12 
  210.          BorderStyle     =   1  'Fixed Single
  211.          Caption         =   "Label12"
  212.          Height          =   810
  213.          Left            =   2310
  214.          TabIndex        =   13
  215.          Top             =   2295
  216.          Width           =   5000
  217.       End
  218.       Begin Label Label11 
  219.          BackColor       =   &H00C0C0C0&
  220.          Caption         =   "Description:"
  221.          Height          =   285
  222.          Left            =   90
  223.          TabIndex        =   12
  224.          Top             =   2325
  225.          Width           =   2100
  226.       End
  227.       Begin Label Label10 
  228.          BackColor       =   &H00C0C0C0&
  229.          Caption         =   "Non-Standard Events:"
  230.          Height          =   255
  231.          Left            =   90
  232.          TabIndex        =   10
  233.          Top             =   2010
  234.          Width           =   2115
  235.       End
  236.       Begin Label Label9 
  237.          BorderStyle     =   1  'Fixed Single
  238.          Caption         =   "Label9"
  239.          Height          =   885
  240.          Left            =   2310
  241.          TabIndex        =   9
  242.          Top             =   930
  243.          Width           =   5000
  244.       End
  245.       Begin Label Label8 
  246.          BackColor       =   &H00C0C0C0&
  247.          Caption         =   "Description:"
  248.          Height          =   255
  249.          Left            =   75
  250.          TabIndex        =   8
  251.          Top             =   975
  252.          Width           =   2145
  253.       End
  254.       Begin Label Label7 
  255.          BackColor       =   &H00C0C0C0&
  256.          Caption         =   "Non-Standard Properties:"
  257.          Height          =   240
  258.          Left            =   45
  259.          TabIndex        =   1
  260.          Top             =   600
  261.          Width           =   2265
  262.       End
  263.       Begin Label Label2 
  264.          Alignment       =   2  'Center
  265.          BackColor       =   &H00C0C0C0&
  266.          Caption         =   "Properties and Events"
  267.          FontBold        =   -1  'True
  268.          FontItalic      =   0   'False
  269.          FontName        =   "MS Sans Serif"
  270.          FontSize        =   13.5
  271.          FontStrikethru  =   0   'False
  272.          FontUnderline   =   0   'False
  273.          Height          =   390
  274.          Left            =   45
  275.          TabIndex        =   6
  276.          Top             =   75
  277.          Width           =   8205
  278.       End
  279.    End
  280.    Begin PictureBox IFrame1 
  281.       BackColor       =   &H00C0C0C0&
  282.       Height          =   3720
  283.       Index           =   0
  284.       Left            =   105
  285.       ScaleHeight     =   3690
  286.       ScaleWidth      =   8325
  287.       TabIndex        =   24
  288.       Top             =   945
  289.       Visible         =   0   'False
  290.       Width           =   8355
  291.       Begin Label Label14 
  292.          BackColor       =   &H00C0C0C0&
  293.          Caption         =   "Ashton Information Services"
  294.          Height          =   1290
  295.          Left            =   2655
  296.          TabIndex        =   15
  297.          Top             =   1335
  298.          Width           =   4830
  299.       End
  300.       Begin Label Label13 
  301.          BackColor       =   &H00C0C0C0&
  302.          Caption         =   "This version of the Tabbed Dialog VBX (TABBED.VBX) is shareware. It can be registered by sending 
  303. 23.50 (
  304. 20.00 + VAT), or US$35 to:"
  305.          Height          =   675
  306.          Left            =   105
  307.          TabIndex        =   14
  308.          Top             =   615
  309.          Width           =   8100
  310.       End
  311.       Begin Label Label1 
  312.          Alignment       =   2  'Center
  313.          BackColor       =   &H00C0C0C0&
  314.          Caption         =   "Tabbed Dialog VBX"
  315.          FontBold        =   -1  'True
  316.          FontItalic      =   0   'False
  317.          FontName        =   "MS Sans Serif"
  318.          FontSize        =   13.5
  319.          FontStrikethru  =   0   'False
  320.          FontUnderline   =   0   'False
  321.          Height          =   450
  322.          Left            =   45
  323.          TabIndex        =   0
  324.          Top             =   210
  325.          Width           =   8175
  326.       End
  327.    End
  328.    Begin PictureBox Tabbed1 
  329.       FontBold        =   -1  'True
  330.       FontItalic      =   0   'False
  331.       FontName        =   "MS Sans Serif"
  332.       FontSize        =   9.75
  333.       FontStrikethru  =   0   'False
  334.       FontUnderline   =   0   'False
  335.       Height          =   4785
  336.       Left            =   30
  337.       ScaleHeight     =   4755
  338.       ScaleWidth      =   8580
  339.       TabIndex        =   25
  340.       Top             =   45
  341.       Width           =   8610
  342.    End
  343. Option Explicit
  344. Sub Combo1_Click ()
  345.     Select Case Combo1.ListIndex
  346.     Case 0
  347.         Label9.Caption = "ActiveTab indicated the tab which is currently active. ActiveTab is an integer in the range 0..NumberOfTabs-1"
  348.     Case 1
  349.         Label9.Caption = "Captions is a comma separated list of the captions to be used for the tabs. For example, this control has a Captions property of """ + Tabbed1.Captions + """"
  350.     Case 2
  351.         Label9.Caption = "NumberOfTabs is an integer giving the number of tabs present in the control."
  352.     Case 3
  353.         Label9.Caption = "Rows is an integer which indicates the number of rows to be used to display the tabs."
  354.     Case 4
  355.         Label9.Caption = "TabHeight is an integer which gives the height of the tabs in twips."
  356.     Case 5
  357.         Label9.Caption = "TabPosition is an enumerated property that allows the tabs to be positioned along any edge of the control."
  358.     Case Else
  359.         Label9.Caption = "Error"
  360.     End Select
  361. End Sub
  362. Sub Combo2_Click ()
  363.     If Combo2.ListIndex = 0 Then
  364.         Label12.Caption = "The TabChange event is executed whenever the user clicks on a tab other than the currently active tab. The single argument is the new value of ActiveTab."
  365.     End If
  366. End Sub
  367. Sub Form_Load ()
  368.     IFrame1(Tabbed1.ActiveTab).Visible = True
  369.     Label6.Caption = "Ashton Information Services is:" + Chr$(13) + Chr$(13) + "Peter Ashton" + Chr$(13) + "28, Dragon View" + Chr$(13) + "Harrogate" + Chr$(13) + "North Yorkshire" + Chr$(13) + "HG1 4DG" + Chr$(13) + "U.K." + Chr$(13) + Chr$(13) + "E-mail: petera@cix.compulink.co.uk"
  370.     Label14.Caption = "Ashton Information Services" + Chr$(13) + "28, Dragon View" + Chr$(13) + "Harrogate" + Chr$(13) + "North Yorkshire" + Chr$(13) + "HG1 4DG" + Chr$(13) + "U.K."
  371.     Combo1.AddItem "NumberOfTabs"
  372.     Combo1.AddItem "Captions"
  373.     Combo1.AddItem "ActiveTab"
  374.     Combo1.AddItem "Rows"
  375.     Combo1.AddItem "TabHeight"
  376.     Combo1.AddItem "TabPosition"
  377.     Combo1.ListIndex = 0
  378.     Combo2.AddItem "TabChange"
  379.     Combo2.ListIndex = 0
  380. End Sub
  381. Sub Tabbed1_TabChange (ActiveTab As Integer)
  382. Dim i As Integer
  383.     For i = 0 To Tabbed1.NumberOfTabs - 1
  384.         If i = ActiveTab Then
  385.             IFrame1(i).Visible = True
  386.         Else
  387.             IFrame1(i).Visible = False
  388.         End If
  389.     Next
  390. End Sub
  391.